/* eslint-disable */
const auditConfig = {

  //运营拣货
  pda_dist_operate (){
    return {
      //扫描框配置
      scanTitle: '请扫描配送单号',
      scanAction: 'wm/dist/findBy',
      ruleCode: 'wm_dist_key',
      scanAfter: (data, that) => {
        if (data.flowStatus != 'picked') {
          that.$notify.warning('请扫描已拣货的配送单')
          return false
        }
        return true
      },

      itemAction: '',

      itemHead: {
        left: {
          left: null,
          right: null,
          leftRight: 'pickAndDemand',
        },
        center: {
          name: 'deptName',
          text: '收货科室',
        },
        right: {
          name: 'flowStatus',
        },
      },


      item: [
        {name: 'pickDate', text: '拣货时间', col: 18},
        {name: 'pickNum', text: '标签数', col: 6},

        {name: 'addressName', text: '收货地址', col: 24},

        {name: 'busKey', text: '调拨单号', col: 12},
        {name: 'warehouseName', text: '配送仓库', col: 12},

        {name: 'busUser', text: '送货时间', col: 12},
        {name: 'busUser', text: '送货人', col: 12},
      ],

      flowBtnList: [
        {
          key: 'dist',
          text: '开始配送',
        }
      ],

      //弹框详情界面配置
      winForm: [
        {
          //标签页名称
          title: '配送明细',
          //数据查询地址
          url: 'wm/dist_item/page',
          //明细查询使用主单据的字段名称
          pkMain: 'id',
          //查询明细子单据的关联字段
          pkDtl: 'dist_id',
          //搜索字段
          searchFields: ['matrName','matrSpec'],
          //搜索提示信息
          searchTextAppend: '品名/品规',
          //列配置
          items: [
            {name: 'matrName', text: '品名', col: 12},
            {name: 'matrSpec', text: '品规', col: 12},
            {name: 'packageUnit', text: '需求单位', col: 24},

            {name: 'skuQty', text: '需求单品', col: 12},
            {name: 'pickedSkuQty', text: '已拣单品', col: 12},
          ],
        },
        {
          //标签页名称
          title: '拣货明细',
          //数据查询地址
          url: 'wm/pick_item/page',
          //明细查询使用主单据的字段名称
          pkMain: 'id',
          //查询明细子单据的关联字段
          pkDtl: 'dist_id',
          //搜索字段
          searchFields: ['matrName','matrSpec', 'sn', 'rfid'],
          //搜索提示信息
          searchTextAppend: '品名/品规/SN/RFID',
          //列配置
          items: [
            {name: 'matrName', text: '品名', col: 24},
            {name: 'matrSpec', text: '品规', col: 12},
            {name: 'lot', text: '批次', col: 12},

            {name: 'sn', text: 'SN', col: 12},
            {name: 'rfid', text: 'RFID', col: 12},
          ],
        }
      ]
    }
  },

  //科室收货
  pda_dist_dept (){
    return {
      //扫描框配置
      scanTitle: '请扫描配送单号',
      scanAction: 'wm/transfer/findByIdForPDA',
      ruleCode: 'wm_transfer_bus_key',
      scanAfter: (data, that) => {
        if (data.flowStatus != 'distributing') {
          that.$notify.warning('请扫描配送中的配送单')
          return false
        }
        return true
      },

      itemAction: '',

      itemHead: {
        left: {
          left: null,
          right: null,
          leftRight: 'pickAndDemand'
        },
        center: {
          name: 'deptNameTo',
          text: '收货科室'
        },
        right: {
          name: 'flowStatus'
        }
      },

      item: [
        { name: 'pickDate', text: '拣货时间', col: 18 },
        { name: 'pickNum', text: '标签数', col: 6 },

        { name: 'deptAddressName', text: '收货地址', col: 24 },

        { name: 'busKey', text: '调拨单号', col: 12 },
        { name: 'toWarehouseName', text: '配送仓库', col: 12 },

        { name: 'busUser', text: '送货时间', col: 12 },
        { name: 'busUser', text: '送货人', col: 12 }
      ],

      flowBtnList: [
        {
          key: 'receiving',
          text: '确认收货'
        }
      ],

      //弹框详情界面配置
      winForm: [
        {
          //标签页名称
          title: '配送明细',
          //数据查询地址
          url: 'wm/dist_item/page',
          //明细查询使用主单据的字段名称
          pkMain: 'id',
          //查询明细子单据的关联字段
          pkDtl: 'dist_id',
          //搜索字段
          searchFields: ['matrName', 'matrSpec'],
          //搜索提示信息
          searchTextAppend: '品名/品规',
          //列配置
          items: [
            { name: 'matrName', text: '品名', col: 12 },
            { name: 'matrSpec', text: '品规', col: 12 },
            { name: 'packageUnit', text: '需求单位', col: 24 },

            { name: 'skuQty', text: '需求单品', col: 12 },
            { name: 'pickedSkuQty', text: '已拣单品', col: 12 }
          ]
        },
        {
          //标签页名称
          title: '拣货明细',
          //数据查询地址
          url: 'wm/pick_item/page',
          //明细查询使用主单据的字段名称
          pkMain: 'id',
          //查询明细子单据的关联字段
          pkDtl: 'dist_id',
          //搜索字段
          searchFields: ['matrName', 'matrSpec', 'sn', 'rfid'],
          //搜索提示信息
          searchTextAppend: '品名/品规/SN/RFID',
          //列配置
          items: [
            { name: 'matrName', text: '品名', col: 24 },
            { name: 'matrSpec', text: '品规', col: 12 },
            { name: 'lot', text: '批次', col: 12 },

            { name: 'sn', text: 'SN', col: 12 },
            { name: 'rfid', text: 'RFID', col: 12 }
          ]
        }
      ]
    }
  },

}

export default auditConfig
